<template>
  <div class="menus-container">
    <el-card class="box-card" shadow="hover">
      <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"/>
    </el-card>
  </div>
</template>

<script setup>
import { computed } from 'vue'
import { useStore } from 'vuex'
const store = useStore()

const data = computed(() => store.getters.menus)
const defaultProps = {
  children: 'children',
  label: 'menuName'
}
const handleNodeClick = (data) => {
  console.log(data)
}
</script>

<style lang="scss" scoped>
.menus-container{}
</style>
